package com.heima.article.controller.v1;

import com.heima.article.service.ArticleService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.article.dtos.ArticleCollectionDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ybw
 * @version 1.0
 * @date 2021/12/22 20:43
 */
@RestController
@RequestMapping("/api/v1")
public class ArticleBehaviorController {
    @Autowired
    private ArticleService articleService;


    /**
     * 收藏文章
     * @param dto
     * @return
     */
    @PostMapping("/collection_behavior")
    public ResponseResult collection(@RequestBody ArticleCollectionDto dto){
        return articleService.articleCollection(dto);
    }
}
